package com.int_tech.utils;
import java.util.List;

/**
 * Created by Administrator on 2017/11/2.
 */
public class WordListUtils {

    private static int TEN = 10;

    private static int ONE = 1;

    private static int ZERO = 0;

    public static List wordListUtils(int size, int page,List wordList){
        if (wordList.size()>size && (page-ONE)*size+TEN<=wordList.size()){
            return wordList.subList((page - ONE) * size, (page - ONE) * size + TEN);
        }else if(wordList.size()>size && (page-ONE)*size+TEN>wordList.size()){
            return wordList.subList((page-ONE)*size, ((page-ONE)*size)+(wordList.size()-((page-ONE)*size)));
        }else{
            return wordList.subList(ZERO,wordList.size());
        }
    }
}
